package com.jzj.service.impl;

import com.jzj.mapper.BookMapper;
import com.jzj.pojo.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class BookServiceImpl implements BookService{


    @Autowired
    private BookMapper bookMapper;

    @Override
    public int addBook(Book book) {
        return bookMapper.addBook(book);
    }

    @Override
    public int delBook(int id) {
        return bookMapper.delBook(id);
    }

    @Override
    public int updateBook(Book book) {
        return bookMapper.updateBook(book);
    }

    @Override
    public List<Book> selectBook() {
        return bookMapper.selectBook();
    }

    @Override
    public List<Book> selectOneBook(String name) {
        return bookMapper.selectOneBook(name);
    }

    @Override
    public Book selectBookbyId(int id) {
        return bookMapper.selectBookbyId(id);
    }
}
